package com.ffapp.rainmonitorcustom.bean;

import com.alibaba.fastjson.annotation.JSONField;

import java.util.ArrayList;
import java.util.Map;

public class ElementListBean extends BaseListBeanBc {

    @JSONField(name = "sensorBasicInfos")
    private ArrayList<ElementListData> sensorBasicInfoList = new ArrayList<ElementListData>();


    public ArrayList<ElementListData> getSensorBasicInfoList() {
        return sensorBasicInfoList;
    }

    public void setSensorBasicInfoList(ArrayList<ElementListData> sensorBasicInfoList) {
        this.sensorBasicInfoList = sensorBasicInfoList;
    }

    @JSONField(name = "stDeviceFactor")
    Map<String, Object> stDeviceFactor;
    public Map<String, Object> getStDeviceFactor() {
        return stDeviceFactor;
    }

    public void setStDeviceFactor(Map<String, Object> stDeviceFactor) {
        this.stDeviceFactor = stDeviceFactor;
    }



    public String getVideoUrl(int params){
        LoginBean loginBean = LoginBean.getInstance();
        if(loginBean == null)return "";
        if(stDeviceFactor == null)return "";
        String url = String.format("rtmp://%s:%s/dvrlive/%s_%s.live",loginBean.getRtmpUrl(),loginBean.getRtmpPort(),stDeviceFactor.get("stcd"),params+"");
//		String url = String.format("rtmp://%s:%s/dvrlive/%s_%s.live",loginBean.getDvrVideoHost(),loginBean.getDvrVideoPort(),getStcd(),params+"");
        return url;
    }






}
